package org.dark.fund.api;

import com.baomidou.mybatisplus.extension.service.IService;
import org.dark.fund.dao.entity.RateReturn;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author wanlh
 * @since 2021-04-29
 */
public interface IRateReturnService extends IService<RateReturn> {

    Map<String, RateReturn> getTodayRate(List<String> fundCodes);

    RateReturn getTodayRate(String fundCode);

    List<RateReturn> getRateRecently(String fundCode, int offset);

    RateReturn getMaxYearUp(String fundCode);

    RateReturn getMaxYearDown(String fundCode);

    /**
     * 成立以来年末净值
     * @param fundCode
     * @return
     */
    List<RateReturn> getYearEndUpRate(String fundCode);

    /**
     * 上升占比
     * @param fundCode
     * @return
     */
    double getYearUpRate(String fundCode);

    String bizDate();

}
